package com.project.service.impl;

import com.project.bean.PProgressBean;
import com.project.mapper.EmployeeMapper;
import com.project.mapper.PProgressMapper;
import com.project.service.IPProgressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;

@Service
@Transactional
public class PProgressServiceImpl implements IPProgressService {
    @Autowired
    private PProgressMapper mapper ;
    @Autowired
    private EmployeeMapper mappers;
    @Override
    public void updateComplete(int id) {
         mapper.updateState(id, LocalDate.now()+"");
    }

    @Override
    public void addEProject(PProgressBean pProgressBean) {
       mapper.addPProject(pProgressBean);
    }

    @Override
    public void updateProjectStatues(int id) {
        PProgressBean pProgressBean;
        mapper.updateComplete(id,"交互使用");
        mapper.updateEmpDate(id,LocalDate.now()+"");
        mappers.updateDate(id,LocalDate.now()+"");
    }
}
